#include <iostream>
using namespace std;
int main()
{
	int a[256], n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}

	int positive_sum = 0;
	for (int i = 0; i < n; i++)
	{
		// if(a[i] > 0){
		// 	positive_sum += a[i];
		// }
		if (a[i] <= 0)
		{
			continue; // skip the rest of the loop and go to the next iteration of the loop.
		}
		positive_sum += a[i];
	}
	cout << positive_sum << endl;
}